package cn.com.suiyi.shixingshengxian.mine;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import cn.com.suiyi.shixingshengxian.base.IBasePresenter;
import cn.com.suiyi.shixingshengxian.bean.ActiveBean;
import cn.com.suiyi.shixingshengxian.bean.MineMessage;

/**
 * Created by Administrator on 2016/7/21.
 */
public class MinePresenter extends IBasePresenter<MineContract.MineView>{
    private MineContract.MineModel model;
    public MinePresenter() {
        model=new MineModel();
        model.init();
        EventBus.getDefault().register(this);
    }
    @Subscribe(threadMode = ThreadMode.MAIN)
    public void sub(MineMessage mineMessage) {
        if (mineMessage == null) {
            getView().onFail("失败");
        } else {
            getView().onSuccess(mineMessage);
        }
    }
}
